package language;

/**
 * This class is to load all action name in different langauge
 */
import java.util.Locale;
import java.util.ResourceBundle;

public class LanguageLoader
{
   public static String _new = "New";
   public static String about = "About";
   public static String advance = "Advance";
   public static String delete = "Delete";
   public static String edit = "Edit";


   public static String editlink = "Edit Link";
   public static String editnode = "Edit Node";
   public static String export = "Export";
   public static String exportPDF = "Export PDF";
   public static String exportPNG = "Export PNG";
   // List of all action name
   public static String file = "File";
   public static String help = "Help";

   public static String insert = "Insert";
   public static String lang = "Language";
   public static String link = "Link";

   public static String node = "Node";
   public static String open = "Open...";
   public static String quit = "Quit";
   public static String redo = "Redo";

   public static String save = "Save";
   public static String saveas = "Save As...";
   public static String simple = "Simple";

   public static String undo = "Undo";
   public static String view = "View";

   /**
    * This method is to properties file in different language
    * 
    * @param language
    *            the language in properties file format is, en, ja and de
    * @param country
    *            the county format ie,DE,JP
    */
   public LanguageLoader(String language, String country)
   {
      ResourceBundle rb;

      if (country == "JP" || country == "CH")
         rb = Utf8ResourceBundle.getBundle("language.Language",
               new Locale(language, country));
      else
         rb = ResourceBundle.getBundle("language.Language",
               new Locale(language, country));
      //        try{
      file = rb.getString("file");
      _new = rb.getString("new");
      open = rb.getString("open");
      save = rb.getString("save");
      saveas = rb.getString("saveas");

      quit = rb.getString("quit");
      edit = rb.getString("edit");
      undo = rb.getString("undo");
      redo = rb.getString("redo");

      editnode = rb.getString("editnode");
      editlink = rb.getString("editlink");
      delete = rb.getString("delete");

      insert = rb.getString("insert");
      node = rb.getString("node");
      link = rb.getString("link");

      view = rb.getString("view");
      simple= rb.getString("simple");
      advance = rb.getString("advance");
      lang = rb.getString("language");

      export = rb.getString("export");
      exportPDF = rb.getString("exportPDF");
      exportPNG = rb.getString("exportPNG");

      help = rb.getString("help");
      about =rb.getString("about");
      //        }
      //        catch (MissingResourceException e){}
   }

}
